import 'package:library_base/entities/generated/json/base/json_field.dart';
import 'package:library_base/entities/generated/json/distribution_entity.g.dart';
import 'package:library_base/entities/distribution_child_entity.dart';
import 'dart:convert';

@JsonSerializable()
class DistributionEntity {
  late String id;
  late String distributionCode;
  late double goodsNumber;
  late String loadingTime;
  double? freightAmt;
  late String status;
  String? carNo;
  String? driverName;
  String? driverMobile;

  bool isExpand = false;

  late List<DistributionChildEntity> distributionDetailTaskResList;

  DistributionEntity();

  factory DistributionEntity.fromJson(Map<String, dynamic> json) =>
      $DistributionEntityFromJson(json);

  Map<String, dynamic> toJson() => $DistributionEntityToJson(this);

  @override
  String toString() => json.encode(this);
}
